<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
com.jxtti.model.User userInfo = com.jxtti.utils.AuthUtil.getUserInfo(request);
String orgId=null;
if(userInfo.getDistrictId()==null || userInfo.getDistrictId().equals("0")){ //非超管
	orgId=userInfo.getOrgId().toString();
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=9" />
		<meta http-equiv="pragma" content="no-cache" />
		<title>纪检举报信息</title>
		<%@ include file="../../common/Admin-list.jsp"%> 		
		<script type="text/javascript" src="<%=bpath %>Scripts/jquery/jquery.form.js"></script> 			 
		<script type="text/javascript">	
				
		$(function(){			
			//保存 
			$("#lnbSave").click(function(){		
				$("#addForm").ajaxSubmit({
					url:"../disciplinaryReportController/update.json",
					type:"POST",
					dataType:"json",
					beforeSubmit:checkForm,
					contentType:"application/x-www-form-urlencoded;charset=UTF-8",
					error:function(){},
					success:function(data){
						if(data.success==true){
							showTip("保存成功，返回列表页面！","succeed");								
						}else{
							art.dialog.alert('保存失败，请确认填写正确！');
						}
					}
				});
			});
			
		});
			
		function checkForm(){
			var flag=$('#addForm').form('validate');
			return true;
		}
				
		//消息提示  
		function showTip(mess,icon) {  
		    art.dialog({  
		        id : 'Tip',  
		        title : '消息',  
		        fixed : true,  
		        lock : true,  
		        opacity: .2,  
		        content : mess,  
		        icon : icon,  
		        time : 1  
		    });  
		    setTimeout('originReload()', 1000);  
		}  
		
		//重载来源页面  
		function originReload(){  
		    var win = art.dialog.open.origin;		    
		    win.location.reload();  
		}
		
		</script>
		
</head>
<body style="overflow: scroll;">
<!---->
<div>
	<div id="tab">
        <ul>
            <li class="Current">
            	<a href="#" onfocus="this.blur()">
            		<span id="lblTitle" >纪检举报 </span>
            	</a>
            </li>
        </ul>
    </div>  
   
    <div id="menu">
        <ul>
            <li>
            	<a id="lnbSave">
            		<span><img src="<%=basePath %>pages/Admin/Images/Icon/save.gif" alt="Save" />保存</span>
            	</a>
            </li>
        </ul>
    </div> 
    
    <div id="middle"> 
    	<!-- 详情 -->
    	<div class="mailinfo" style="width:925px;">
      		<div class="mailbt">      		
      			纪检举报 --${data.disciplinary.searchId}
      		</div>
      		<table width="100%" cellspacing="1" cellpadding="0" border="0" bgcolor="#CCCCCC" align="center">
       		<tbody>
       		     <tr>
                    <td width="15%" class="tdRight">日&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 期：</td>
                    <td width="82%">                    		
                   		<fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss"  value="${data.disciplinary.createTime}"  type="both" />								
                    </td>
                </tr>                
                <tr>
                	<td width="15%" class="tdRight"> 举&nbsp;&nbsp;报&nbsp;&nbsp;人：</td>
                    <td width="82%" >
                    	${data.disciplinary.ad_name}
                    	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    	${data.disciplinary.ad_iDcards}
                    	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    	${data.disciplinary.ad_tel }   
                    	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    	${data.disciplinary.ad_email }                           	
                    </td>
                </tr>               
                <tr>
                    <td class="tdRight" valign="top">通讯地址：</td>
                    <td>${data.disciplinary.ad_address}</td>
                </tr>     
                <tr>
                	<td class="tdRight">标&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 题：</td>
                    <td>${data.disciplinary.title}</td>
                </tr>    
                <tr>
                    <td class="tdRight" valign="top">内&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 容：</td>
                    <td>${data.disciplinary.contents}</td>
                </tr>                                                    
      		</tbody>
      		</table>     
    	</div>     
    	
    	  	<!-- 回复 -->
    	<div class="mailinfo" style="margin-bottom:30px;width:925px;">
      		<div class="mailbt">	      		
	      			纪检答复---	      	
	      		<c:choose> 
  					<c:when test="${data.disciplinary.states=='0'}">
  						待回复
  					</c:when>   					
				  	<c:otherwise> 				
				    	已回复 
				  	</c:otherwise> 
				</c:choose> 
      		</div>
      		<form action="../disciplinaryReportController/update.json" id="addForm" name="addForm" method="post" >    
      		<table width="100%" cellspacing="1" cellpadding="0" border="0" bgcolor="#CCCCCC" align="center">
       		<tbody>
       			<tr class="eTr">
                	<td width="15%" class="tdRight">
                    	<label id="Label1" >是否公开：</label>
                	</td>
                    <td width="82%">       	
                	 	
                	 	<input class="inputRadio" type="radio" value="1" ${(data.disciplinary.is_publish_ad=='1')?'checked' : ''} name="is_publish_ad" id="accuserAnonymousFlagYes" />
	                	<label class="Radiolabel" for="accuserAnonymousFlagYes">是</label>
	                	
						<input class="inputRadio" type="radio"  value="0" ${(data.disciplinary.is_publish_ad=='0' || data.disciplinary.is_publish_ad ==null )?'checked' : ''} name="is_publish_ad" id="accuserAnonymousFlagNo" />
						<label class="Radiolabel" for="accuserAnonymousFlagNo">否</label>	
                    </td>                 
            	</tr>
                <tr id="replyTr">
                	<td class="tdRight" valign="top">
                    	<label id="Label1" >回复内容：</label>
                	</td>
                	<td>
                		<input type="hidden" id="id" name="id" value="${data.disciplinary.id }"/>            
						<textarea rows="5" style="height:150px;" id="reply_content" name="reply_content">${data.disciplinary.reply_content}</textarea>
					</td>
            	</tr>                                      
      		</tbody>
      		</table>  
      		</form>    
    	</div>
    	
    </div>
</div>
</body>
</html>